package crazy_eights;

public class Card {

	public enum Suite
	{
		HEARTS,
		SPADES,
		CLUBS,
		DIAMONDS
	}

	public enum Value
	{
		TWO,
		THREE,
		FOUR,
		FIVE,
		SIX,
		SEVEN,
		EIGHT,
		NINE,
		TEN,
		JACK,
		QUEEN,
		KING,
		ACE
	}
	
	public Suite suite;
	public Value value;
	
	public Card(Value initValue, Suite initSuite)
	{
		value = initValue;
		suite = initSuite;
	}
	
	public Card(Card c)
	{
		this.value = c.value;
		this.suite = c.suite;
	}
	
	public Card()
	{
		value = Value.TWO;
		suite = Suite.HEARTS;
	}
	
	public Boolean lessThan(Card c)
	{
		return this.value.compareTo(c.value) < 0;
	}
	
	public Boolean greaterThan(Card c)
	{
		return !this.lessThan(c);
	}
	
	public Boolean equalTo(Card c)
	{
		return this.value.equals(c.value);
	}
	
	@Override public String toString()
	{
		return value.toString() + " : " + suite.toString();
	}
	
}
